<template>
	<div class="bussiness-detail">
		<top title='商家详情' show='true' back='true'></top>
		<div class="b-detail-img">
			<img :src="info.front_cover" />
		</div>
		<div class="b-detail-info">
			<div class="b-info-title">{{info.name}}</div>
			<div class="b-info-list">
				<ul>
					<li>
						<div>
							<img src="../static/img/hot.png" />
						</div>
						<div>
							<span class="info-num">{{info.heat}}</span>
							<span class="info-text">热度</span>
						</div>
					</li>
					<li>
						<div>
							<img src='../static/img/appoint.png' />
						</div>
						<div>
							<span class="info-num">{{info.allocated_quantity}}次</span>
							<span class="info-text">预约量</span>
						</div>
					</li>
					<li>
						<div>
							<img src="../static/img/time.png" />
						</div>
						<div>
							<span class="info-num">{{info.business_hours}}</span>
							<span class="info-text">营业时间</span>
						</div>
					</li>
				</ul>
			</div>
		</div>
		<div class="info-address">
			<div class="info-address-l">
				<img src="../static/img/default-img.png" />
			</div>
			<div class="info-address-r">
				<div class="distance-num">{{info.distance_str}}</div>
				<div class="distance-text">{{info.address}}</div>
			</div>
		</div>

		<div class="introduction">
			<div class="introduction-title">
				<div class="introduction-title-l">
					商家简介
				</div>
				<div class="introduction-title-r">
					查看更多
				</div>
			</div>
			<div class="introduction-des">
				<p>{{info.introduce}}</p>
			</div>
		</div>
	</div>
</template>

<script>
	import top from '@/components/top.vue';
	import modal from '../routeUrl.js';
	import globaldata from '../globaldata.js';

	export default {
		data() {
			return {
				info: {}
			}
		},
		components: {
			top
		},
		methods: {

		},
		created() {
			console.log()
			let parms = {
				longitude: '120.384205',
				latitude: '36.073204',
				store_id: this.$route.query,
				t_id: globaldata.t_id
			}
			modal.info(parms).then(res => {
				console.log(res)
				if (res.code == 1) {
					this.info = res.data
				}

			})
		},
		mounted() {

		}
	}
</script>

<style lang="scss">
	@import '../assets/scss/main.scss';

	.introduction {
		background: #FFFFFF;
		padding: px2vw(15) px2vw(20);
		box-sizing: border-box;

		.introduction-title {
			display: flex;
			display: -webkit-flex;
			justify-content: space-between;
			align-items: center;
			margin-bottom: px2vw(10);

			.introduction-title-l {
				font-size: px2vw(15);
				font-weight: bold;
			}

			.introduction-title-r {
				font-size: px2vw(11);
				color: #49B0A8;
			}


		}

		.introduction-des {
			p {
				width: 100%;
				font-size: px2vw(14);
				color: rgba(115, 121, 129, 1);
				line-height: px2vw(21);
			}

		}
	}


	.info-address {
		display: flex;
		display: -webkit-flex;
		background: #FFFFFF;
		padding: px2vw(14) px2vw(17);
		box-sizing: border-box;
		border-bottom: 1px dashed #E8EBF1;

		.info-address-l {
			img {
				width: px2vw(54);
				height: px2vw(45);
				display: block;
				border-top-left-radius: px2vw(15);
				border-bottom-left-radius: px2vw(15);
			}
		}

		.info-address-r {
			display: flex;
			display: -webkit-flex;
			align-items: center;
			background: #F6F6F6;
			border-top-right-radius: px2vw(15);
			border-bottom-right-radius: px2vw(15);
			flex: 1;
			padding-left: px2vw(5);
			box-sizing: border-box;

			.distance-num {
				height: px2vw(16);
				padding: 0 px2vw(6);
				border-radius: px2vw(16);
				background: #F7D6E2;
				color: #FB5492;
				font-size: px2vw(12);
			}

			.distance-text {
				font-size: px2vw(13);
				margin-left: px2vw(7);
			}
		}
	}



	.b-detail-img {
		padding: px2vw(2) px2vw(18);
		box-sizing: border-box;
		background: #FFFFFF;

		img {
			width: 100%;
			height: px2vw(188);
			border-radius: px2vw(15);
		}
	}

	.b-info-title {
		font-size: px2vw(18);
		font-weight: bold;
		padding: px2vw(10) px2vw(20) px2vw(18) px2vw(20);
		box-sizing: border-box;
		background: #FFFFFF;
	}

	.b-info-list {
		background: #FFFFFF;

		ul {
			display: flex;
			display: -webkit-flex;
			align-items: center;
			justify-content: space-between;
			padding: 0 px2vw(18);

			li {
				display: flex;
				display: -webkit-flex;
				align-items: center;

				img {
					width: px2vw(32);
					height: px2vw(32);
					display: block;
					margin-right: px2vw(5);
				}

				span {
					display: block;
				}

				.info-num {
					font-size: px2vw(11);
				}

				.info-text {
					font-size: px2vw(9);
					color: #737981;
				}
			}
		}
	}
</style>
